(DEFUN C:MODTINPTS ( / pline-ss cnt ename edata); modpt-data
  (ALERT "Select a (heavy) polyline with point values to assign to the surface you will select.")
  (SETQ pline-ss (SSGET '((0 . "Polyline")(100 . "AcDb2DPolyline")(100 . "AcDb3DPolyline"))))
  (SETQ cnt 0
        modpt-data NIL
  )
  (WHILE (< cnt (SSLENGTH pline-ss))
    (SETQ ename (SSNAME pline-ss cnt))
    (SETQ edata (ENTGET ename))
    (WHILE (NOT (EQ (CDR (ASSOC 0 edata)) "SEQEND"))
      (IF (EQ (CDR (ASSOC 0 edata)) "VERTEX")
        (IF (AND modpt-data (MEMBER (LIST (CDR (ASSOC 10 edata))) modpt-data))
          NIL
          (SETQ modpt-data (APPEND modpt-data (LIST (CDR (ASSOC 10 edata)))))
        )
      )
      (SETQ edata (ENTGET (ENTNEXT (CDR (ASSOC -1 edata)))))
    )
    (SETQ cnt (1+ cnt))
  )
  (SETQ OLD-CMDECHO (GETVAR "CMDECHO"))
  (SETVAR "CMDECHO" 1)
  (SETQ OLD-OSMODE (GETVAR "OSMODE"))
  (SETVAR "OSMODE" 0)
  (IF ukword NIL (LOAD "ukword" "\nFile UKWORD.LSP not loaded! "))
;;;  (SETQ do_addpts (ukword 1 "Yes No" "Do you want to use the same points with ADDSURFACEPOINT? (existing surface points will be ignored)" (IF do_addpts do_addpts "Yes")))
;;;  (IF (EQ do_addpts "Yes")
;;;    (PROGN
;;;      (COMMAND "ADDSURFACEPOINT" "")
;;;      (FOREACH n modpt-data
;;;        (COMMAND (STRCAT (RTOS (CAR n) 2 4) "," (RTOS (CADR n) 2 4)))
;;;        (COMMAND (RTOS (CADDR n) 2 4))
;;;      )
;;;    )
;;;  )
;;;  (COMMAND nil nil  nil)
  (COMMAND "EDITSURFACEPOINT" "")
  (FOREACH n modpt-data
    (COMMAND (STRCAT (RTOS (CAR n) 2 4) "," (RTOS (CADR n) 2 4)))
    (COMMAND "")
    (COMMAND (RTOS (CADDR n) 2 4))
  )
  (SETVAR "OSMODE" OLD-OSMODE)
  (SETVAR "CMDECHO" OLD-CMDECHO)
  (PRINC)
) ;_ end of DEFUN
;;;****************************************************************************
(DEFUN C:ADDTINPTS ( / pline-ss cnt ename edata); modpt-data
  (ALERT "Select a (heavy) polyline with point values to assign to the surface you will select.")
  (SETQ pline-ss (SSGET '((0 . "Polyline")(100 . "AcDb2DPolyline")(100 . "AcDb3DPolyline"))))
  (SETQ cnt 0
        modpt-data NIL
  )
  (WHILE (< cnt (SSLENGTH pline-ss))
    (SETQ ename (SSNAME pline-ss cnt))
    (SETQ edata (ENTGET ename))
    (WHILE (NOT (EQ (CDR (ASSOC 0 edata)) "SEQEND"))
      (IF (EQ (CDR (ASSOC 0 edata)) "VERTEX")
        (IF (AND modpt-data (MEMBER (LIST (CDR (ASSOC 10 edata))) modpt-data))
          NIL
          (SETQ modpt-data (APPEND modpt-data (LIST (CDR (ASSOC 10 edata)))))
        )
      )
      (SETQ edata (ENTGET (ENTNEXT (CDR (ASSOC -1 edata)))))
    )
    (SETQ cnt (1+ cnt))
  )
  (SETQ OLD-CMDECHO (GETVAR "CMDECHO"))
  (SETVAR "CMDECHO" 1)
  (SETQ OLD-OSMODE (GETVAR "OSMODE"))
  (SETVAR "OSMODE" 0)
  (IF ukword NIL (LOAD "ukword" "\nFile UKWORD.LSP not loaded! "))
;;;  (SETQ do_addpts (ukword 1 "Yes No" "Do you want to use the same points with ADDSURFACEPOINT? (existing surface points will be ignored)" (IF do_addpts do_addpts "Yes")))
;;;  (IF (EQ do_addpts "Yes")
    (PROGN
      (COMMAND "ADDSURFACEPOINT" "")
      (FOREACH n modpt-data
        (COMMAND (STRCAT (RTOS (CAR n) 2 4) "," (RTOS (CADR n) 2 4)))
        (COMMAND (RTOS (CADDR n) 2 4))
      )
    )
;;;  )
  (SETVAR "OSMODE" OLD-OSMODE)
  (SETVAR "CMDECHO" OLD-CMDECHO)
  (PRINC)
) ;_ end of DEFUN
